﻿@{
    string id = Context.User.Claims.FirstOrDefault(c => c.Type == "Id")?.Value;
}
<!DOCTYPE html>

<html>
<head>
    <title>@ViewBag.Title</title>

    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="~/lib/layui/css/layui.css" rel="stylesheet">
</head>
<body>
    <div>
        <ul class="layui-nav">
            <li class="layui-nav-item">
                <a href="/home/index">
                    <img style="width:120px;height:45px" src="~/images/blog_logo.png" />
                </a>
            </li>
            <li class="layui-nav-item">
                <a href="/home/index">首页</a>
            </li>
            <li class="layui-nav-item ">
                <a href="/home/Blog?blogType=2">CSharp</a>
            </li>
            <li class="layui-nav-item">
                <a href="/home/Blog?blogType=3">C++</a>
            </li>
            <li class="layui-nav-item"><a href="/home/Blog?blogType=5">SQL</a></li>
            <li class="layui-nav-item">
                <a href="/home/Blog?blogType=4">JAVA</a>
            </li>

        </ul>
        <ul class="layui-nav  layui-layout-right">
            <li class="layui-nav-item" lay-unselect style="margin-right:10px">

                @if (id != null)
                {
                    <a asp-controller="User" asp-action="Personal">
                        <img src="~/images/logo.png" class="layui-nav-img">
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a asp-controller="User" asp-action="Personal">个人中心</a></dd>
                        <dd><a asp-controller="Blog" asp-action="Manage">内容管理</a></dd>
                        <hr>
                        <dd style="text-align: center;"><a asp-controller="User" asp-action="Exit">退出</a></dd>
                    </dl>
                }
                else
                {
                    <a asp-controller="User" asp-action="Login" class="layui-icon layui-icon-friends">登录</a>
                }

            </li>
            <li class="layui-nav-item" lay-unselect style="margin-right:10px">
                <a asp-controller="Blog" asp-action="Create" class="layui-btn layui-btn-normal layui-btn-radius">发布</a>
            </li>
        </ul>
    </div>
    <div style="height:10px"></div>

    <script src="~/lib/layui/layui.js"></script>
    <script src="~/lib/jquery/jquery.js"></script>
    <div class="layui-container" style="background:#f7f7f7">
        <div id="div_content" class="layui-col-md9" style="margin-top:10px">
            @RenderBody()
        </div>
        <div class="layui-col-md3">
            <div style="margin-top:10px;width:auto;height:280px" align="center" class="layui-panel">
                <img src="~/images/logo.png" style="margin:10px; width:120px;height:120px;border-radius:50%;overflow:hidden" class="center"/>
                <br />
                <label style="font-size:21px;font-weight:800">虫子不吃鸟</label>
                <br />
                <div data-v-ceb10d1d="" style="font-size: 0.875rem;">邮箱：875962179@qq.com</div>
            </div>
        </div>
    </div>
    <div class="layui-footer " style="background:#2f363c;height:50px;visibility:hidden ">
        <!-- 底部固定区域 -->
        <div style="width:100px; margin: 21px auto 0;margin-top:10px">
            <i style="margin-left:10px;color:white" class="layui-icon layui-icon-eye">18829206496</i>
        </div>
    </div>


</body>
</html>
